package TwT2;

public abstract class CPU {

    private String Name;
    private int coreNum;
    private double price;

    public CPU(){}
    public CPU(String Name,int coreNum,double price){
        this.Name = Name;
        this.coreNum = coreNum;
        this.price = price;
    }

    String getName(){
        return this.Name;
    }
    int getCoreNum(){
        return this.coreNum;
    }
    double getPrice(){
        return this.price;
    }

    void work(){
        System.out.println(this.Name + "+work");
    }

    public void Display(){
        System.out.println("Name:" + this.Name);
        System.out.println("coreNum:" + this.coreNum);
        System.out.println("price:" + this.price);
    }

    public static void main(String[] args) {
        AMD R9_3900X = new AMD("R9_3900X",9,3700);
        R9_3900X.Display();
        R9_3900X.work();
        Intel i7_10700k = new Intel("i7_10700k",10,3300);
        i7_10700k.Display();
        i7_10700k.work();

    }
}
